<!--/* 
* Copyright (c) 2009, The University of Texas at Austin
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, 
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, 
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, 
* this list of conditions and the following disclaimer in the documentation and/or other materials 
* provided with the distribution.
*
* Neither the name of The University of Texas at Austin nor the names of its contributors may be 
* used to endorse or promote products derived from this software without specific prior written 
* permission.
* 
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/-->

<Window x:Class="Bio.Data.Providers.rCAD.Structure.Views.CreateNewConnection"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:julmar="http://www.julmar.com/wpfhelpers"
    xmlns:Resources="clr-namespace:Bio.Data.Providers.rCAD.Structure.Resources"
    Background="{DynamicResource WindowBackgroundBrush}"
    WindowStartupLocation="CenterOwner" FocusManager.FocusedElement="{julmar:FirstFocusedElement}"
    Width="500" Height="600" ShowInTaskbar="False" Title="Create a new RCAD connection">

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <Resources:DataTemplates />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

    <Grid Margin="10">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ContentControl Grid.Row="0" Content="{Binding}">
            <ContentControl.Style>
                <Style TargetType="ContentControl">
                    <Setter Property="ContentTemplate" Value="{DynamicResource DatabaseSelection}" />
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding CurrentStep}" Value="2">
                            <Setter Property="ContentTemplate" Value="{DynamicResource FilterSelection}" />
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </ContentControl.Style>
        </ContentControl>

        <DockPanel Grid.Row="1" VerticalAlignment="Center" LastChildFill="False">
            <Button DockPanel.Dock="Left" Content="Cancel" Margin="5" Padding="5" IsCancel="True" MinWidth="75" />
            <Button DockPanel.Dock="Right" Command="{Binding NextCommand}" Margin="5" Padding="5" Content="Next&gt;&gt;" MinWidth="75" />
            <Button DockPanel.Dock="Right" Command="{Binding PreviousCommand}" Margin="5" Padding="5" Content="&lt;&lt;Previous" MinWidth="75" />
        </DockPanel>

    </Grid>

</Window>
